import styled from "styled-components";

export const BrowserWrapper = styled.div`
  background-color: #333;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 999;
  .top {
    position: relative;
    height: 86px;
    .closeBtn {
      position: absolute;
      top: 20px;
      left: 20px;
      font-size: 30px;
      color: white;
    }
  }
  .slider {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    overflow: hidden;
    .picture{
      height: 100%;

      /* CSSTransition 样式 */
      .pic-enter {
        opacity: 0;
        transform: translateX(${props => props.isNext ? "100%" : "-100%"});
      }
      .pic-enter-active {
        transform: translate(0);
        opacity: 1;
        transition: all 200ms ease;
      }
      .pic-exit {
        opacity: 1;
      }
      .pic-exit-active {
        opacity: 0;
        transition: all 200ms ease;
      }


      img {
        height: 100%;
        max-width: 110%;
        object-fit: cover;
      }
    }

    .control {
      position: absolute;
      padding: 30px;
      z-index: 1;
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
      display: flex;
      justify-content: space-between;
      align-items: center;
      bottom: 0;
      color: #fff;
      .left, .right {
        font-size: 60px;
        cursor: pointer;
        width: 100px;
        text-align: center;
      }
    }
  }
  .preview {
    flex-shrink: 0;
    margin-top: 10px;
    display: flex;
    justify-content: center;
    height: 100px;
    .info {
      position: absolute;
      bottom: 10px;
      max-width: 105vh;
      color: #fff;
      .desc {
        display: flex;
        justify-content: space-between;

        .toggle {
          cursor: pointer;
        }
      }
      .list {
        margin-top: 3px;
        overflow: hidden;
        transition: height 300ms ease;
        /* height: 67px; */
        height: ${props => props.showList ? "67px" : "0"};
        .item {
          margin-right: 15px;
          cursor: pointer;

          img {
            height: 67px;
            opacity: 0.5;
          }

          &.active {
            img {
              opacity: 1;
            }
          }
        }
      }
    }
  }
`